package com.dragon.repository.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 供应商产品报价关联表
 * </p>
 *
 * @author sy
 * @since 2023-08-17
 */
@Getter
@Setter
@TableName("dragon_quotes_products")
public class QuotesProducts implements Serializable {


    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 供应商产品id
     */
    private Integer productsId;

    /**
     * 报价id
     */
    private Integer quotesId;

    /**
     * 数量
     */
    private Integer num;

    /**
     * 总价
     */
    private Double price;

    /**
     * 单价
     */
    private Double onePrice;

    /**
     * 备注
     */
    private Double remark;

    /**
     * 规格型号
     */
    @TableField(exist = false)
    private String specification;

    /**
     * 单位名称
     */
    @TableField(exist = false)
    private String unitName;


    /**
     * 材质
     */
    @TableField(exist = false)
    private String material;


    /**
     * 产品名称
     */
    @TableField(exist = false)
    private String name;

    /**
     * 子级嵌套
     */
    @TableField(exist = false)
    private QuotesProducts  productsData;

    /**
     * 合同编码
     */
    @TableField(exist = false)
    private String contractCode;


    /**
     * 合同订单时间
     */
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date orderTime;


    /**
     * 合同金额
     */
    @TableField(exist = false)
    private Double contractMoney;

}